home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Updates / PowerPC / jpeg2ps / psimage.h < prev    next >
C/C++ Source or Header  |  2000-05-16  |  2KB  |  49 lines

  1. /* -------------------------- psimage.h ------------------------- */
  2. #ifndef TRUE
  3. #define TRUE  1
  4. #endif
  5. #ifndef FALSE
  6. #define FALSE 0
  7. #endif
  8.  
  9. #ifdef min
  10. #undef min
  11. #endif
  12. #define min(a, b) ((a) < (b) ? (a) : (b))
  13.  
  14. typedef int BOOL;
  15.  
  16. /* Simple prototype macros for K&R and ANSI-C */
  17.  
  18. #ifdef KNR
  19. #define P0(v)            ()
  20. #define P1(t1, p1)        (p1) t1 p1
  21. #define P2(t1, p1, t2, p2)    (p1, p2) t1 p1; t2 p2
  22. #define P3(t1, p1, t2, p2, t3, p3)    (p1, p2, p3) t1 p1; t2 p2; t3 p3
  23. #else
  24. #define P0(v)            (void)
  25. #define P1(t1, p1)        (t1 p1)
  26. #define P2(t1, p1, t2, p2)    (t1 p1, t2 p2)
  27. #define P3(t1, p1, t2, p2, t3, p3)    (t1 p1, t2 p2, t3 p3)
  28. #endif
  29.  
  30. /* data output mode: binary, ascii85, hex-ascii */
  31. typedef enum { BINARY, ASCII85, ASCIIHEX } DATAMODE;
  32.  
  33. typedef struct {
  34.   FILE     *fp;                   /* file pointer for jpeg file         */
  35.   char     *filename;             /* name of image file             */
  36.   int      width;                 /* pixels per line             */
  37.   int      height;                /* rows                 */
  38.   int      components;            /* number of color components         */
  39.   int      bits_per_component;    /* bits per color component         */
  40.   float    dpi;                   /* image resolution in dots per inch   */
  41.   DATAMODE mode;                  /* output mode: 8bit, ascii, ascii85     */
  42.   long     startpos;              /* offset to jpeg data         */
  43.   BOOL     landscape;             /* rotate image to landscape mode?     */
  44.   BOOL     adobe;                 /* image includes Adobe comment marker */
  45. } imagedata;
  46.  
  47. #define    DPI_IGNORE    -1.0      /* dummy value for imagedata.dpi       */
  48. #define DPI_USE_FILE     0.0      /* dummy value for imagedata.dpi       */
  49.